import { renderElement } from '../renderElement'
import ActionSheet from './ActionSheet'
import { ActionSheetParams } from './type'

export const useActionSheet = (options: ActionSheetParams) => {
	renderElement(ActionSheet, options)
}

export const api =
	(options: Record<string, any>) => (localOptions: ActionSheetParams) => {
		useActionSheet({
			...options,
			...localOptions
		})
	}
